#coding=utf-8
import json
from global_utils import http_protocol
from global_utils.log import logger
from global_utils.parser_ws_config import WSCONFIG
from global_utils.http_protocol import HttpHelp

#通过项目获取测试信息
class ProjectInfo(object):

    #获取项目信息
    def get_test_project(self,project_id):
        project_info=HttpHelp.get(WSCONFIG.get_project, parameter={"project_id":project_id})    
        logger.info("获取项目ID".decode("utf8")+"ID:%s" % (project_id,) )
        logger.info("测试项目信息:%s".decode("utf8") % (project_info.encode("utf8"),))
        
        project_info=http_protocol.to_dict(project_info)
        return project_info
    
    #获取所有用例
    def get_test_suite(self,project_id):
        pass
        

if __name__=="__main__":
    #print ProjectInfo.get_test_project(1)
    print   ProjectInfo().get_test_project(1)
       
    